From: Keir Fraser Date: Wed, 22 Sep 2010 17:26:01 +0000 (+0100) Subject: xsm: return unlabeled instead of failing with ENOENT in get_page_sid X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11435 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22%22?a=commitdiff_plain;h=f9b43436a82493421eee03e45ffd07c42e8cab05;p=xen.git xsm: return unlabeled instead of failing with ENOENT in get_page_sid It is better to return an unlabeled SID in the case where dsec is NULL instead of bailing out with an error. From: Daniel De Graaf Signed-off-by: Keir Fraser --- diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c index c58f8d71b6..1b36a9e913 100644 --- a/xen/xsm/flask/hooks.c +++ b/xen/xsm/flask/hooks.c @@ -340,10 +340,7 @@ static int get_page_sid(struct page_info *page, u32 *sid) default: /*Pages are implicitly labeled by domain ownership!*/ dsec = d->ssid; - if (dsec) - *sid = dsec->sid; - else - rc = -ENOENT; + *sid = dsec ? dsec->sid : SECINITSID_UNLABELED; break; }